package csl.blog.server;

import csl.blog.server.netty.NioNettyServer;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * @Description: TODO
 * @author: 隔山海
 * @date: 2021年07月11日 23:27
 */
@Slf4j
@SpringBootApplication
@MapperScan("csl.blog.server.mapper")
@EnableAsync
@EnableDiscoveryClient
public class BlogServerApplication implements CommandLineRunner {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(BlogServerApplication.class, args);
        context.getBean(NioNettyServer.class).start();
        log.info("生产者启动成功");
    }


    @Override
    public void run(String... args) {
        log.info("====================server start success================");
    }

}
